package com.ktjy.pojo.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;

/**
 * 操作记录表实体类
 *
 * @author LILIBO
 * @since 2025-06-18
 */
@Tag(name = "操作记录表", description = "操作记录表数据")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("`sys_opr_record`")
public class SysOprRecord implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 操作记录ID
     */
    @Schema(description = "操作记录ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 操作的业务名称
     */
    @Schema(description = "操作的业务名称")
    private String oprName;

    /**
     * 操作类型 0-新增;1-修改;2-删除
     */
    @Schema(description = "操作类型 0-新增;1-修改;2-删除")
    private Integer oprType;

    /**
     * 操作的功能ID
     */
    @Schema(description = "操作的功能ID")
    private Long oprMenuId;

    /**
     * 操作的数据ID
     */
    @Schema(description = "操作的数据ID")
    private Long oprDataId;

    /**
     * 操作参数
     */
    @Schema(description = "操作参数")
    private String oprParam;

    /**
     * 操作人ID
     */
    @Schema(description = "操作人ID")
    private Long userId;

    /**
     * 操作人账号
     */
    @Schema(description = "操作人账号")
    private String userName;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 状态 0-成功;1-失败
     */
    @Schema(description = "状态 0-成功;1-失败")
    private Integer status;

    /**
     * 记录时间
     */
    @Schema(description = "记录时间")
    private String recordTime;

    /**
     * 带参构造方法
     */
    public SysOprRecord(String oprName, Integer oprType, Long oprMenuId, Long oprDataId, String oprParam, Long userId, String userName, String remark, Integer status, String recordTime) {
        this.oprName = oprName;
        this.oprType = oprType;
        this.oprMenuId = oprMenuId;
        this.oprDataId = oprDataId;
        this.oprParam = oprParam;
        this.userId = userId;
        this.userName = userName;
        this.remark = remark;
        this.status = status;
        this.recordTime = recordTime;
    }

}
